package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.SeckillProductVo;
import cn.wolfcode.feign.fallback.SeckillProductFeignApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zhenfeng
 * @Date 2021/5/13
 */
@FeignClient(name = "seckill-service", fallback = SeckillProductFeignApiFallback.class)
public interface SeckillProductFeignApi {
    /**
     * 调用秒杀服务获取秒杀商品接口
     * @param time 描述时间点
     * @return Result对象
     */
    @RequestMapping("/seckillProduct/querySeckillProductByTime")
    Result<List<SeckillProductVo>> querySeckillProductByTime(@RequestParam("time") int time);
}
